package cn.study.controller;


import cn.study.entity.StudyBanner;
import cn.study.service.StudyBannerService;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 轮播图表 前端控制器
 * </p>
 *
 * @author qiao
 * @since 2020-06-22
 */
@RestController
@RequestMapping("/study-banner")
public class StudyBannerController {

    @Resource
    StudyBannerService studyBannerService;


    @GetMapping("/list")
    public List<StudyBanner> list(Model model, @RequestParam(value = "id", required = false ) Integer id) {
        List<StudyBanner> list = studyBannerService.getBanner(id);
        return list;
    }
}

